﻿/// <summary>
/// 功能：
/// 作者：chao.jiang
/// 日期：2012/8/16 14:22:23
/// 备注：
/// 修改：
/// </summary>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Phoenix.Common
{
    public class MD5
    {
        public static string GetMD5String(string SourceString)
        {
            byte[] b = System.Text.UTF8Encoding.Default.GetBytes(SourceString);
            b = new System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(b);
            string strReturn = "";
            for (int i = 0; i < b.Length; i++)
                strReturn += b[i].ToString("x").PadLeft(2, '0');
            return strReturn;
        }
    }
}
